<SUBSECTION Standard>
GDK_WINDOW
GDK_WINDOW_GET_CLASS
-GDK_WINDOW_OBJECT
GDK_TYPE_WINDOW
GDK_IS_WINDOW
GDK_WINDOW_CLASS
is public for historical reasons. Don't change that part */
typedef struct _GdkWindowPaint GdkWindowPaint;
+#define GDK_WINDOW_OBJECT(object) ((GdkWindowObject *) GDK_WINDOW (object))
+
struct _GdkWindowObject
{
- /* vvvvvvv THIS PART IS PUBLIC. DON'T CHANGE vvvvvvvvvvvvvv */
GdkDrawable parent_instance;
GdkDrawable *impl; /* window-system-specific delegate object */
GdkWindowRedirect *redirect;
- /* ^^^^^^^^^^ THIS PART IS PUBLIC. DON'T CHANGE ^^^^^^^^^^ */
-
/* The GdkWindowObject that has the impl, ref:ed if another window.
* This ref is required to keep the wrapper of the impl window alive
* for as long as any GdkWindow references the impl. */
#define GDK_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_WINDOW))
#define GDK_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WINDOW, GdkWindowObjectClass))
-#ifndef GDK_DISABLE_DEPRECATED
-#define GDK_WINDOW_OBJECT(object) ((GdkWindowObject *) GDK_WINDOW (object))
-
-#ifndef GDK_COMPILATION
-
-/* We used to export all of GdkWindowObject, but we don't want to keep doing so.
- However, there are various parts of it accessed by macros and other code,
- so we keep the old exported version public, but in reality it is larger. */
-
-/**** DON'T CHANGE THIS STRUCT, the real version is in gdkinternals.h ****/
-struct _GdkWindowObject
-{
- GdkDrawable parent_instance;
-
- GdkDrawable *GSEAL (impl); /* window-system-specific delegate object */
-
- GdkWindowObject *GSEAL (parent);
-
- gpointer GSEAL (user_data);
-
- gint GSEAL (x);
- gint GSEAL (y);
-
- gint GSEAL (extension_events);
-
- GList *GSEAL (filters);
- GList *GSEAL (children);
-
- GdkColor GSEAL (bg_color);
- GdkPixmap *GSEAL (bg_pixmap);
-
- GSList *GSEAL (paint_stack);
-
- cairo_region_t *GSEAL (update_area);
- guint GSEAL (update_freeze_count);
-
- guint8 GSEAL (window_type);
- guint8 GSEAL (depth);
- guint8 GSEAL (resize_count);
-
- GdkWindowState GSEAL (state);
-
- guint GSEAL (guffaw_gravity) : 1;
- guint GSEAL (input_only) : 1;
- guint GSEAL (modal_hint) : 1;
- guint GSEAL (composited) : 1;
-
- guint GSEAL (destroyed) : 2;
-
- guint GSEAL (accept_focus) : 1;
- guint GSEAL (focus_on_map) : 1;
- guint GSEAL (shaped) : 1;
- guint GSEAL (support_multidevice) : 1;
-
- GdkEventMask GSEAL (event_mask);
-
- guint GSEAL (update_and_descendants_freeze_count);
-
- GdkWindowRedirect *GSEAL (redirect);
-};
-#endif
-#endif
struct _GdkWindowObjectClass
{
* Boston, MA 02111-1307, USA.
*/
-/* need to get the prototypes of all get_type functions */
-#undef GTK_DISABLE_DEPRECATED
-/* Need to get GDK_WINDOW_OBJECT */
-#undef GDK_DISABLE_DEPRECATED
#include "config.h"
GSList *matches = NULL;
gpointer udata;
gdk_window_get_user_data (widget->window, &udata);
- if (udata == widget && (!input_only || (GDK_IS_WINDOW (widget->window) && GDK_WINDOW_OBJECT (widget->window)->input_only)))
+ if (udata == widget && (!input_only || (GDK_IS_WINDOW (widget->window) && gdk_window_is_input_only (GDK_WINDOW (widget->window)))))
matches = g_slist_prepend (matches, widget->window);
children = gdk_window_get_children (gtk_widget_get_parent_window (widget));
for (node = children; node; node = node->next)
{
gdk_window_get_user_data (node->data, &udata);
- if (udata == widget && (!input_only || (GDK_IS_WINDOW (node->data) && GDK_WINDOW_OBJECT (node->data)->input_only)))
+ if (udata == widget && (!input_only || (GDK_IS_WINDOW (node->data) && gdk_window_is_input_only (GDK_WINDOW (node->data)))))
matches = g_slist_prepend (matches, node->data);
}
return g_slist_reverse (matches);
-#undef GDK_DISABLE_DEPRECATED
#include <gtk/gtk.h>
#ifdef GDK_WINDOWING_X11
#include <X11/Xlib.h>
static GtkWidget *main_window;
-static gboolean
-window_has_impl (GdkWindow *window)
-{
- GdkWindowObject *w;
- w = (GdkWindowObject *)window;
- return w->parent == NULL || w->parent->impl != w->impl;
-}
GdkWindow *
create_window (GdkWindow *parent,
g_string_append_printf (s, "%d,%d %dx%d (%d,%d,%d) %d %d\n",
x, y, w, h,
color->red, color->green, color->blue,
- window_has_impl (window),
+ gdk_window_has_native (window),
g_list_length (gdk_window_peek_children (window)));
save_children (s, window);
GtkTreeIter *iter,
gpointer data)
{
+ GdkColor *color = NULL;
GdkWindow *window;
char *name;
0, &window,
-1);
- if (window_has_impl (window))
+ if (gdk_window_has_native (window))
name = g_strdup_printf ("%p (native)", window);
else
name = g_strdup_printf ("%p", window);
+
+ gdk_window_get_background (window, color);
g_object_set (cell,
"text", name,
- "background-gdk", &((GdkWindowObject *)window)->bg_color,
- NULL);
+ "background-gdk", color,
+ NULL);
}
static void